package promote.brozen.webflux;

import org.springframework.web.reactive.function.client.WebClient;

/**
 * @author Brozen
 * @date 2020/8/6 10:50 AM
 * @email brozen@qq.com
 */
public class WebClientTest {

    public static void main(String[] args) {
        String json = WebClient.create("http://jxadmin.superboss.cc")
                .get()
                .uri(uriBuilder -> uriBuilder.scheme("http")
                        .host("jxadmin.superboss.cc")
                        .path("/api/vas-order-offline/query")
                        .queryParam("start", "2020-07-01 00:00:00")
                        .queryParam("end", "2020-09-01 00:00:00")
                        .build())
                .exchange()
                .block()
                .bodyToMono(String.class)
                .block();
        System.out.println(json);
    }

}
